package com.hqyj.mall.xiaomimall.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.io.Serializable;

//订单子表
@Data
@Entity
@AllArgsConstructor
@NoArgsConstructor
public class OrderSub extends BaseEntity {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @TableId(type= IdType.AUTO)
    private Integer id;

    private String oid; //订单编号
    private Integer itemId; //商品编号
    private String name; //商品名称
    private double price; //单价
    private int buyNum; //购买数量
    private double sum; //小计

}
